<template>
  <!-- 业绩分配 -->
  <div class="mian">
    <div class="left">
      <div class="title">
        <span>业绩分配</span>
      </div>
      <el-tree :data="treeData" :highlight-current="false" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
    </div>
    <div class="right">
      <div class="title">
        <span>产品信息</span>
      </div>
      <div class="header">
        <el-form ref="form"  :model="form" label-width="80px">
          <el-form-item label="客户名称">
            <el-input v-model="form.name" placeholder="请输入客户名称"></el-input>
          </el-form-item>
          <el-form-item label="交易日期">
            <el-date-picker
                v-model="form.date"
                type="date"
                placeholder="选择交易日期">
              </el-date-picker>
          </el-form-item>
          <el-form-item label="分配状态">
            <el-select v-model="form.status" placeholder="请选择任务周期">
              <el-option label="分配" value="0"></el-option>
              <el-option label="未分配" value="1"></el-option>
            </el-select>
          </el-form-item>
        </el-form>
        <div class="btns">
          <div>
            <el-button class="btn">业绩分配</el-button>
          </div>
          <div>
            <el-button class="btn">查询</el-button>
            <el-button class="btn">重置</el-button>
          </div>
        </div>
      </div>
      <div class="table">
          <el-table :data="tableData" style="width: 100%">
            <el-table-column
              type="selection"
              width="55">
            </el-table-column>
            <el-table-column type="index" label="序号" align="center">
            </el-table-column>
            <el-table-column prop="name" label="客户名称" width="180" align="center">
            </el-table-column>
            <el-table-column prop="type" label="客户类型" width="80px" align="center">
            </el-table-column>
            <el-table-column prop="holding" label="持有量（亿）" width="120" align="center">
            </el-table-column>
            <el-table-column prop="assetType" label="资产类别"  align="center">
            </el-table-column>
            <el-table-column prop="assetName" label="资产名称" align="center">
            </el-table-column>
            <el-table-column prop="handle" label="经办"   align="center">
            </el-table-column>
            <el-table-column prop="transactioDate" label="交易日期" width="120"  align="center">
            </el-table-column>
            <el-table-column prop="volume" label="交易量"   align="center">
            </el-table-column>
            <el-table-column prop="status" label="分配状态"   align="center">
            </el-table-column>
          </el-table>
      </div>
      <div>
        <el-pagination
          small
          background
          layout="prev, pager, next"
          :total="total"
          @current-change="pageFn"
        >
        </el-pagination>
      </div>
      <!-- <div class="addForm">
        <el-dialog title="考核任务信息"  :visible.sync="dialogFormVisible">
          <el-form :model="addForm" label-width="160px">
            <el-form-item label="任务名称" >
              <el-input v-model="addForm.name" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="任务周期">
              <el-select v-model="addForm.period" placeholder="请选择任务周期">
                <el-option label="年" value="0"></el-option>
                <el-option label="月" value="1"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="开始日期" >
              <el-date-picker
                v-model="addForm.startDate"
                type="date"
                placeholder="选择开始日期">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="结束日期">
              <el-date-picker
                v-model="addForm.startDate"
                type="date"
                placeholder="选择结束日期">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="指标体系">
              <el-input v-model="addForm.system" autocomplete="off"></el-input>
            </el-form-item>
            <el-form-item label="创建结构">
              <el-input v-model="addForm.structure" autocomplete="off"></el-input>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button class="btn" @click="dialogFormVisible = false">取 消</el-button>
            <el-button class="btn" type="primary" @click="dialogFormVisible = false">确 定</el-button>
          </div>
        </el-dialog>
      </div> -->
    </div>
  </div>
  
</template>

<script>
export default {
  data() {
    return {
      form:{
        name:'',
        system:'',
        period:'',
      },
       total: 0,
      tableData:[
        {
          index:'1',
          name:'金灵元安基金有限公司',
          type:'基金公司',
          holding:'3.0',
          assetType:'',
          assetName:'',
          handle:'李刚',
          transactioDate:'2022-01-01',
          volume:'-',
          status:'未分配'
        },
        {
          index:'2',
         name:'金灵元安基金有限公司',
          type:'基金公司',
          holding:'3.0',
          assetType:'',
          assetName:'',
          handle:'李刚',
          transactioDate:'2022-01-01',
          volume:'-',
          status:'未分配'
        },
        {
          index:'3',
          name:'金灵元安基金有限公司',
          type:'基金公司',
          holding:'3.0',
          assetType:'',
          assetName:'',
          handle:'李刚',
          transactioDate:'2022-01-01',
          volume:'-',
          status:'未分配'
        },
        {
          index:'4',
          name:'金灵元安基金有限公司',
          type:'基金公司',
          holding:'3.0',
          assetType:'',
          assetName:'',
          handle:'李刚',
          transactioDate:'2022-01-01',
          volume:'-',
          status:'未分配'
        },
        
      ],
      dialogFormVisible:false,
      // addForm:{
      //   name:'',
      //   period:'',
      //   startDate:'',
      //   endDate:'',
      //   system:'',
      //   structure:'',
      // },
      treeData:[
        {
          label:'资产业务',
          children:[
            {
              label:'货币基金投资'
            },
            {
              label:'同业借贷投资'
            },
          ],
        }
      ],
      defaultProps: {
        children: 'children',
        label: 'label'
      }
    }
  },
  methods:{
    addInfo(){
      this.dialogFormVisible = true
    },
    pageFn(){
      //
    },
    handleNodeClick(){
      //
    }
  }

}
</script>

<style lang="scss" scoped>  
  .mian {
      display: flex;
    }
  .header {
    background: #262d47;
    padding: 10px;
  }
  .left {
    width: 200px;
  }
  .title {
        height: 30px;
        line-height: 30px;
        background-color: #37405e;
        color: #fff;
        span {
          margin-left: 10px;
        }
      }
  .right {
    flex: 1;
    overflow: scroll;
    margin-left: 5px;
  }
  .btns {
    display: flex;
    justify-content: space-between;
    padding: 10px;
  }
  ::v-deep {
    
    .header {
      .el-form {
        display: flex;
      }
    }
    .addForm {
      .el-form .el-form-item .el-form-item__content .el-input__inner.el-input__inner{
        width: 300px;
      }
    }
    .el-table {
      min-height: 440px;
    }
    .el-table th.el-table__cell {
      background-color: #1c2238 ;
      color: #fff ;
    }
    .el-pagination {
      text-align: right;
    }
    .el-tree{
      background: none;
      color: #fff;
      .el-tree-node__content:hover{
        color: #fff;
        background:#1F9BFD ;
      }
      .el-tree-node:focus > .el-tree-node__content{
        background: #1F9BFD;
      }
  }
  }
</style>